{% extends "base.html" %}

{% block title %}
    Welcome 
{% endblock %}

{% block head %}

{% endblock %}

{% block extrahead %}
<style>
input {
	width: 160px;
}

textarea {
	width:160px;
	height: 70px;
}

th {
	white-space: nowrap;
}

th, tr, td {
	border:0px none;
	background-color: white;
}

input.openid {
  width:220px;
  background: url(/appmedia/openid.gif) no-repeat;
  background-position: 0 50%;
  padding: 2px;
  padding-left: 16px;
  border: 1px solid #707070;
  color: blue;
  /*font-size: smaller;*/
  font-weight: bold;
}

</style>

<script language="JavaScript" type="text/javascript">
	function ShowAddTicketForm() {
		var suggestions = document.getElementById('suggestions');
	
		$.get('/get_ticket_form/', null, function(data){ suggestions.innerHTML = data;});
	}
	
	function ShowOpenIDForm() {
		var text = '<a href="http://openid.net/">OpenID</a> is a decentralised authentication system. If you use <a href="http://www.livejournal.com/">LiveJournal</a> or <a href="http://www.vox.com/">Vox</a> you already have an OpenID. Just use the URL of your homepage there.';
		$("#login_table").html('<tr><td colspan=2><input type="text" class="openid" id="openid_url" name="openid_url" /></td></tr><tr><td colspan="2"><input type="submit" class="submit" value="Sign in" /> or <a href="/" style="color:blue;font-weight:bold">Go back</a></td></tr><tr><td colspan="2"><p class="about help_text">'+ text +'</p></td></tr>');
		document.getElementById('openid_url').focus();
		document.getElementById('login').action="/openid/";
		$("#login_header").html("Sign in with OpenID");
	}
	
</script>
{% endblock %}

{% block content %}
<table cellspacing="0">
	<tr>
		<td class="index" style="vertical-align:top;">
			{% include "index_text.html" %}
		</td>

		<td style="vertical-align:top;">
			<p>
			
			<div class="form_layer" style="padding: 3px; width:250px;">
			<h1 id="login_header" class="login_header">Sign in</h1>
			    <form id="login" action="/accounts/login/" method="post">
				    <table id="login_table" cellspacing="0">
				        <tr>
				            <td>Username:</td>
				            <td> 
				                <input type="text" id="username" name="username" />
				            </td>
				        </tr>
				        <tr>
				            <td>Password:</td>
				            <td> 
				                <input type="password" name="password" />
				            </td>
				        </tr>
				        <tr>
				            <td colspan="2">
				            	<input type="submit" class="submit" value="Sign in" />
				            	or <a href="javascript:ShowOpenIDForm()" style="color:blue;font-weight:bold">Sign in with OpenID</a>
				            </td>
				        </tr>
				    </table>
			    </form>
			</div>
			
			<p>
			
			<div class="form_layer" style="padding: 3px; width:250px;">
				<h1 class="login_header">Don't have account?</h1>
					<center>
					<a href="/registration/" style="font-size:17px;color:blue;font-weight:bold">Create a new<br>Account now</a>
					</center>
					<p>
			</div>
			
			<p>
			
			<!-- 
			<div class="form_layer" style="padding: 3px; width:250px;">
				<h1 class="login_header">Have questions or suggestions?</h1>
				<div id="suggestions">
					<center>
					<a class="header_menu" href="javascript:ShowAddTicketForm()" style="font-size:15px;color:blue;font-weight:bold">
						Open a ticket<br/>and let us know!
						<br/>
					</a>
					<p>
					</center>
				</div>
			</div>
			
			<p>
			 -->
			<div class="form_layer" style="padding: 3px; width:250px;">
				<h1 class="login_header">Related sites</h1>
				<script src="http://gmodules.com/ig/ifr?url=http://google.jeeva-con.com/simple_rss/simple_rss.xml&amp;up_url=http%3A%2F%2Fwww.text-link-ads.com%2Fxml_blogger.php%3Finventory_key%3DJZQM1VNNTDX78IEBIPO5&amp;up_amount=8&amp;up_font=arial&amp;up_fontsize=8&amp;up_mode=titles_only&amp;up_showdate=0&amp;up_direction=ltr&amp;synd=open&amp;w=240&amp;h=200&amp;title=&amp;border=%23ffffff%7C3px%2C1px+none+%23c3d9ff&amp;output=js"></script>
			</div>
		</td>
	</tr>
</table>
<p>
<script type="text/javascript">
	document.getElementById('username').focus()
</script>
{% endblock %}
